package com.dynamic.datasource.provider;

import com.dynamic.datasource.property.DataSourceProperty;
import lombok.AllArgsConstructor;

import javax.sql.DataSource;
import java.util.Map;

/**
 * @author 王先堂
 * @Description 默认实现的数据源加载器
 * @createTime 2022/03/24/ 15:20:00
 */
@AllArgsConstructor
public class DefaultDataSourceProvider extends AbstractDataSourceProvider {

    private final Map<String, DataSourceProperty> dataSourcePropertyMap;

    @Override
    public Map<String, DataSource> load() {
        return createDataSourceMap(dataSourcePropertyMap);
    }
}
